Matthias Clasen [Sat, 30 Sep 2017 15:04:16 +0000 (11:04 -0400)]
Reshuffle things a little bit
Instead of having a function with lots of arguments in
GskVulkanRender that we call from GskVulkanRenderPass which
then just calls back into GskVulkanRenderPass, just create
the new render pass object locally, and an api to add it
to the list that GskVulkanRender keeps. This makes it
a lot easier to preserve all the relevant parameters from
the parent render pass.
Matthias Clasen [Sat, 30 Sep 2017 14:42:32 +0000 (10:42 -0400)]
Small simplification
Just keep the viewport as a graphene_rect_t, we don't need
to use the Vulkan type here.
Matthias Clasen [Sat, 30 Sep 2017 14:39:04 +0000 (10:39 -0400)]
vulkan: Add a counter for intermediate textures
Count how many pixels of intermediate textures we create.
If we can count it, we can optimize it.
Matthias Clasen [Sat, 30 Sep 2017 14:37:55 +0000 (10:37 -0400)]
Cosmetics
Factor out a helper function.
Matthias Clasen [Sat, 30 Sep 2017 03:29:33 +0000 (23:29 -0400)]
Fix a doc comment
It was missing a return.
Benjamin Otte [Sat, 30 Sep 2017 18:23:11 +0000 (20:23 +0200)]
inspector: GSK_IS_RENDER_NODE() does NULL-check
That means we don't need an extra one just so gcc can complain.
Matthias Clasen [Sat, 30 Sep 2017 02:41:00 +0000 (22:41 -0400)]
Support repeat nodes in vulkan
We can use the texture pipeline for this, with a repeating sampler.
Matthias Clasen [Sat, 30 Sep 2017 03:01:34 +0000 (23:01 -0400)]
vulkan: Add a repeating sampler
None of the render ops use it, yet.
Matthias Clasen [Sat, 30 Sep 2017 02:38:59 +0000 (22:38 -0400)]
vulkan: Move sampler creation down
This is in preparation of allowing multiple samplers.
Matthias Clasen [Sat, 30 Sep 2017 02:24:53 +0000 (22:24 -0400)]
vulkan: Rename blend pipeline to texture
This is what it does, and the name blend is easily
confused with blend-mode.
Matthias Clasen [Sat, 30 Sep 2017 02:07:30 +0000 (22:07 -0400)]
vulkan: Allow to control scaling in the blend pipeline
Pass in a second rect that defines the size of the texture.
Update the sole caller to pass in the same rect, for unchanged
behavior.
Matthias Clasen [Fri, 29 Sep 2017 19:45:37 +0000 (15:45 -0400)]
vulkan: Fix setup for dependent render passes
We were not correctly preserving the modelview transform.
Daniel Boles [Fri, 29 Sep 2017 17:13:44 +0000 (18:13 +0100)]
docs: css-properties: Fix wrongly repeated colour
Timm Bäder [Fri, 29 Sep 2017 10:16:06 +0000 (12:16 +0200)]
testsuite: Add test case for previous commit
This previously led to a loop in the child widgets.
Timm Bäder [Fri, 29 Sep 2017 10:15:23 +0000 (12:15 +0200)]
widget: Fix inserting child widgets at the beginning
We have to care about the child widget's current prev/next sibling as
well.
Timm Bäder [Fri, 29 Sep 2017 10:10:42 +0000 (12:10 +0200)]
build: Add widgetorder unit test to build system
Timm Bäder [Fri, 29 Sep 2017 08:50:33 +0000 (10:50 +0200)]
box: Remove return value from box_pack
Unused.
Timm Bäder [Fri, 29 Sep 2017 08:49:41 +0000 (10:49 +0200)]
box: Remove size_allocate_no_center
GtkBox never has a center widget these days.
Timm Bäder [Fri, 29 Sep 2017 07:23:56 +0000 (09:23 +0200)]
adwaita: Remove outlines from focused entries for now
Matthias Clasen [Fri, 29 Sep 2017 01:41:24 +0000 (21:41 -0400)]
Recorder: Add details for inset and outset shadow nodes
Matthias Clasen [Fri, 29 Sep 2017 01:06:52 +0000 (21:06 -0400)]
gsk: Fix a typo
Repeating linear gradient nodes share most of the implementation
with linear gradient nodes, but they shouldn't share the class name.
Matthias Clasen [Fri, 29 Sep 2017 01:06:35 +0000 (21:06 -0400)]
Recorder: Show details about linear gradient nodes
Matthias Clasen [Thu, 28 Sep 2017 23:48:42 +0000 (19:48 -0400)]
Recorder: Show details of blur nodes
Matthias Clasen [Thu, 28 Sep 2017 23:40:03 +0000 (19:40 -0400)]
recorder: Show details for blend nodes
Matthias Clasen [Thu, 28 Sep 2017 23:39:16 +0000 (19:39 -0400)]
gsk: remove gsk_blend_node_get_blend_mode from public api
We don't have any other such getters in the public api at
this point, so leave this one out as well.
Matthias Clasen [Thu, 28 Sep 2017 23:20:25 +0000 (19:20 -0400)]
Recorder: Show details of crossfade nodes
Matthias Clasen [Thu, 28 Sep 2017 23:14:32 +0000 (19:14 -0400)]
recorder: Show details for opacity nodes
Matthias Clasen [Thu, 28 Sep 2017 22:58:18 +0000 (18:58 -0400)]
Recorder: Show details of border nodes
Matthias Clasen [Thu, 28 Sep 2017 22:41:39 +0000 (18:41 -0400)]
recorder: Put text color in the right row
It ended up in the wrong place by accident.
Matthias Clasen [Thu, 28 Sep 2017 22:37:47 +0000 (18:37 -0400)]
Recorder: Show colors visually for text too
Just because we can do it.
Matthias Clasen [Thu, 28 Sep 2017 22:37:00 +0000 (18:37 -0400)]
Reshuffle the recorder ui a bit
Make it possible to see the properties and the rendering at
the same time, it makes navigating easier.
Matthias Clasen [Thu, 28 Sep 2017 22:17:38 +0000 (18:17 -0400)]
recorder: Show surfaces and textures
This makes the properties list much more interesting.
Matthias Clasen [Thu, 28 Sep 2017 21:16:41 +0000 (17:16 -0400)]
recorder: Show text node properties
Matthias Clasen [Thu, 28 Sep 2017 19:08:08 +0000 (15:08 -0400)]
recorder: show color information for color nodes
A first step towards showing more information for render nodes.
Timm Bäder [Thu, 28 Sep 2017 18:00:24 +0000 (20:00 +0200)]
Plug some memory leaks
Make sure the scroll controllers in GtkComboBox and GtkScrolledWindow
get destroyed.
Timm Bäder [Tue, 26 Sep 2017 16:22:27 +0000 (18:22 +0200)]
GdkEvent: OWNER_CHANGE events have a selection as well
Timm Bäder [Tue, 26 Sep 2017 10:49:32 +0000 (12:49 +0200)]
GdkEvent: Unref user_data in free
gdk_event_set_user_data refs it and this was creating pretty bad leaks.
Matthias Clasen [Thu, 28 Sep 2017 14:27:58 +0000 (10:27 -0400)]
vulkan: Measure gpu time
Since this value is only meaningful if we wait for the rendering
to end, we only keep this timer if GSK_RENDERING_MODE=sync is
enabled.
Matthias Clasen [Thu, 28 Sep 2017 14:26:01 +0000 (10:26 -0400)]
gsk: Change the profiler setup
Move away from the idea of intra-frame sampling, since we only
push samples once per frame, anyway. Instead, make the profiler
keep a rolling average of the last n frames.
Matthias Clasen [Thu, 28 Sep 2017 14:23:12 +0000 (10:23 -0400)]
gsk: Redo the sampling in the profiler
Reset the min/max/average counters before calculating,
and only print the values if we have samples. In addition,
print the number of samples.
Matthias Clasen [Thu, 28 Sep 2017 12:29:14 +0000 (08:29 -0400)]
gsk: Add a profile counter for vulkan render passes
This is interesting now that we have multiple render passes.
Matthias Clasen [Thu, 28 Sep 2017 00:56:01 +0000 (20:56 -0400)]
vulkan: Implement multiple render passes
Whenever we need a node as a texture, we now start a new render
pass that renders the node into a new intermediate texture, and
set up a semaphore to make the current render pass wait for it.
As part of this reorganization, much of the setup and drawing
code moved from gskvulkanrender.c to gskvulkanrenderpass.c.
Matthias Clasen [Thu, 28 Sep 2017 00:55:14 +0000 (20:55 -0400)]
Add an api to get the vertex data for a render pass
Matthias Clasen [Thu, 28 Sep 2017 00:09:35 +0000 (20:09 -0400)]
Add semaphores to the command buffer submit api
Allow to pass in semaphores to wait for before executing
and to signal after executing the command buffer. This
just exposes the capabilities of the underlying Vulkan
api. Update all callers to pass no semaphores, for now.
We will use this in the future.
Matthias Clasen [Tue, 26 Sep 2017 23:12:20 +0000 (19:12 -0400)]
Add an api to create intermediate textures
The new function creates a vulkan image that is suitable for
use as a framebuffer to render to and as a texture to read from.
Piotr Drąg [Thu, 28 Sep 2017 12:01:57 +0000 (14:01 +0200)]
inspector: Mark missing strings for translation
Sam Thursfield [Mon, 25 Sep 2017 13:42:46 +0000 (14:42 +0100)]
flowbox: Fix annotation for GListModel binding callback
The GtkFlowBoxCreateWidgetFunc type lacked GObject Introspection
annotations for its arguments. This made gtk_flow_box_bind_model()
unusable from Python as the callback function would be passed useless
values.
The annotations that I've added match those of the similar callback
type GtkListBoxCreateWidgetFunc.
https://bugzilla.gnome.org/show_bug.cgi?id=780758
Matthias Clasen [Tue, 26 Sep 2017 22:24:52 +0000 (18:24 -0400)]
vulkan: Update the outset-shadow fragment shaders
These were missing the blur-radius parameter that is written
by the vertex shader, causing Vulkan validation to complain.
Matthias Clasen [Tue, 26 Sep 2017 22:18:31 +0000 (18:18 -0400)]
gsk: Fix Vulkan validation errors for image upload
I've finally figured out the right combination of src and dest
stage and access flags to make all validation warnings go away.
This commit only fixes the direct upload code.
Matthias Clasen [Tue, 26 Sep 2017 22:17:27 +0000 (18:17 -0400)]
gdk: Tone down Vulkan validation
Don't show informational messages by default, only warnings
and errors. This makes it much easier to see what is going
on.
Daniel Elstner [Tue, 26 Sep 2017 19:13:40 +0000 (21:13 +0200)]
gdk-wayland: Do not leak dummy 1x1 surface on every draw
When using EGL, neither leak nor re-create the dummy 1x1 Cairo
surface every time gdk_wayland_window_ensure_cairo_surface()
is called.
https://bugzilla.gnome.org/show_bug.cgi?id=775126
Matthias Clasen [Tue, 26 Sep 2017 01:02:21 +0000 (21:02 -0400)]
gsk: report fallback pixels as a profile counter
This makes the value show up in the inspector without
any extra work. We report the number per-frame, since
that makes the most sense.
Matthias Clasen [Tue, 26 Sep 2017 00:58:10 +0000 (20:58 -0400)]
gsk: Add a way to reset profiler counters
It is often useful to count things per-frame, and reset
the counter afterwards.
Matthias Clasen [Mon, 25 Sep 2017 22:37:22 +0000 (18:37 -0400)]
vulkan: add a frame counter to the profiler
This is just to match the gl renderer and to learn how
counters work.
Matthias Clasen [Mon, 25 Sep 2017 21:53:54 +0000 (17:53 -0400)]
Fix a typo
Matthias Clasen [Mon, 25 Sep 2017 21:03:06 +0000 (17:03 -0400)]
gsk: Make profiler counters more useful
Make it possible to have counters that get incremented
by values other than 1.
Matthias Clasen [Mon, 25 Sep 2017 13:25:29 +0000 (09:25 -0400)]
gsk: count fallback pixels
Always helps to have some measure of progress.
Debarshi Ray [Mon, 18 Sep 2017 16:28:55 +0000 (18:28 +0200)]
GtkBuilder: Enforce "class" as a mandatory attribute for <object>
https://bugzilla.gnome.org/show_bug.cgi?id=786931
Rico Tzschichholz [Mon, 25 Sep 2017 09:15:14 +0000 (11:15 +0200)]
gsk: Some g-i annotation fixes
Matthias Clasen [Mon, 25 Sep 2017 01:53:54 +0000 (21:53 -0400)]
gsk: Documentation additions
Document newly added apis, and ensure that all public apis
are listed in the docs.
Matthias Clasen [Mon, 25 Sep 2017 01:34:53 +0000 (21:34 -0400)]
Plug a memory leak
A function with ensure in the name would better check if the
thing it is supposed to ensure already exists.
Daniel Boles [Sun, 24 Sep 2017 11:02:54 +0000 (12:02 +0100)]
Label: Replace allow-none with nullable/optional
Timm Bäder [Sun, 24 Sep 2017 16:15:41 +0000 (18:15 +0200)]
emojichooser: Plug a memory leak
Andre Klapper [Sat, 23 Sep 2017 21:42:31 +0000 (23:42 +0200)]
Fix broken translations of 'calendar:' settings (ignored translator comments)
Matthias Clasen [Sat, 23 Sep 2017 17:15:30 +0000 (13:15 -0400)]
gsk: Fix a prefix mishap
There shouldn't be any gst_ functions in here...
Matthias Clasen [Sat, 23 Sep 2017 13:47:05 +0000 (09:47 -0400)]
Cosmetics
Go back to a single GskVulkanOpRender that can
handle 0, 1 or 2 sources.
Matthias Clasen [Sat, 23 Sep 2017 12:59:06 +0000 (08:59 -0400)]
vulkan: Implement nonseparable blendmodes
This is a directly-from-the-spec, unoptimized implementation.
Matthias Clasen [Sat, 23 Sep 2017 05:59:50 +0000 (01:59 -0400)]
vulkan: Implement blend modes
This is another example for a 2-texture shader.
So far, only separable blend modes are implemented.
The implementation is not optimized, with an
if-else cascade in the shader.
Matthias Clasen [Fri, 22 Sep 2017 22:48:36 +0000 (18:48 -0400)]
vulkan: fix a clip handling problem
We were looking at uninitialized memory here, instead
of the type of the source clip, as we should.
This showed up as mispositioned clip in the first frame
of a crossfade stack transition, and also as overdraw in
sliding stack transitions.
Matthias Clasen [Fri, 22 Sep 2017 18:20:57 +0000 (14:20 -0400)]
vulkan: Implement crossfade
This is the first shader using two textures. It almost works.
Matthias Clasen [Fri, 22 Sep 2017 17:30:26 +0000 (13:30 -0400)]
vulkan: Drop GskVulkanPipelineLayout
We already move the descriptor set layout out of it,
so we can just as well keep the pipeline layouts in
the render object as well, and get rid of this extra
object. Update all callers.
Matthias Clasen [Fri, 22 Sep 2017 14:35:19 +0000 (10:35 -0400)]
Allow different pipeline layouts
These are differentiated by the number of textures; currently
we have shaders with 0 and 1 textures.
Matthias Clasen [Fri, 22 Sep 2017 14:13:25 +0000 (10:13 -0400)]
Add a getter to the pipeline layout directly from the pipeline
This is a step towards allowing multiple pipeline layouts.
Matthias Clasen [Fri, 22 Sep 2017 14:02:27 +0000 (10:02 -0400)]
vulkan: Move descriptor set layout to the render object
We want to maintain a single descriptor set layout while introducing
multiple pipeline layouts, so split this off.
Arash Mousavi [Fri, 22 Sep 2017 19:24:21 +0000 (22:54 +0330)]
Update Persian translations
Rico Tzschichholz [Thu, 21 Sep 2017 12:07:11 +0000 (14:07 +0200)]
gdk: Add g-i annotations for new event getters
Matthias Clasen [Fri, 22 Sep 2017 00:31:48 +0000 (20:31 -0400)]
Fix a typo
Emilio Pozuelo Monfort [Thu, 21 Sep 2017 18:34:26 +0000 (20:34 +0200)]
Drop gail-4.0.pc.in
libgail is gone.
Matthias Clasen [Thu, 21 Sep 2017 17:47:17 +0000 (13:47 -0400)]
gsk: vulkan: Drop an unused api
We don't use the upload-single-region api anymore.
No need to keep it around.
Matthias Clasen [Thu, 21 Sep 2017 17:45:01 +0000 (13:45 -0400)]
vulkan: Batch uploads from the glyph cache
This uses the new api that was introduced in the previous
commit.
Matthias Clasen [Thu, 21 Sep 2017 17:42:57 +0000 (13:42 -0400)]
vulkan: Add an api to update multiple image regions
Instead of doing multiple copy commands with a tiny buffer
for each glyph, we can just batch them all together. This
also avoids the issue of creating multiple barriers for the
same image.
Matthias Clasen [Thu, 21 Sep 2017 16:05:00 +0000 (12:05 -0400)]
vulkan: Quiet another validation warning
It complains if a vertex shader has an out that is not matched
to an in of the fragment shader.
Matthias Clasen [Thu, 21 Sep 2017 03:46:16 +0000 (23:46 -0400)]
vulkan: Quiet another validation error
Matthias Clasen [Thu, 21 Sep 2017 01:16:45 +0000 (21:16 -0400)]
Cosmetic change
Matthias Clasen [Thu, 21 Sep 2017 01:16:09 +0000 (21:16 -0400)]
gsk: Make repeat nodes deserializable
This was just a simple oversight.
Matthias Clasen [Thu, 21 Sep 2017 01:00:33 +0000 (21:00 -0400)]
gsk: Fix serialization of text nodes
Matthias Clasen [Wed, 20 Sep 2017 21:52:40 +0000 (17:52 -0400)]
Add simple aging for the glyph cache
This should prevent the cache from growing out of bounds.
Lionel Landwerlin [Wed, 20 Sep 2017 23:12:16 +0000 (19:12 -0400)]
gsk vulkan: Use new api in the glyph cache
Use the newly introduced gsk_vulkan_image_new_for_atlas.
Lionel Landwerlin [Wed, 20 Sep 2017 23:11:42 +0000 (19:11 -0400)]
gsk: vulkan: rework image layout/access transitions
By tracking the last transition we can build the appropriate barriers.
Also use the most appropriate initial layout/access at creation :
for linear image : predefined (we prepare the content ourself through memcpy)
for everything else : undefined (we don't care about the content, will most likely be erase)
Lionel Landwerlin [Wed, 20 Sep 2017 17:41:09 +0000 (18:41 +0100)]
gsk: vulkan: silence anisotropy validation warning
Matthias Clasen [Wed, 20 Sep 2017 14:02:29 +0000 (10:02 -0400)]
glyph cache: Upload glyphs incrementally
This does not work yet.
Matthias Clasen [Wed, 20 Sep 2017 14:01:58 +0000 (10:01 -0400)]
vulkan: pass the context when creating a glyph cache
Matthias Clasen [Wed, 20 Sep 2017 14:00:48 +0000 (10:00 -0400)]
vulkan: Add an upload_region api to GskVulkanImage
This will let us update larger textures incrementally.
Sadly, it does not work yet.
Matthias Clasen [Wed, 20 Sep 2017 03:59:44 +0000 (23:59 -0400)]
Add some debug output for the glyph cache
Print out some statistics and dump the glyph caches to a png,
for now.
Matthias Clasen [Wed, 20 Sep 2017 03:32:07 +0000 (23:32 -0400)]
Make the glyph cache grow as needed
Make it possible to have more than one texture in the
glyph cache, and create new ones when we run out of space
in the existing ones.
Matthias Clasen [Tue, 19 Sep 2017 23:32:04 +0000 (19:32 -0400)]
vulkan: Move glyph cache to a separate file
Otherwise things will get too messy.
Matthias Clasen [Tue, 19 Sep 2017 22:53:32 +0000 (18:53 -0400)]
vulkan: Better glyph cache api
Move the glyph caching api to something that can support using
multiple textures. We now split the text render ops into multiple
ops for different textures, and make each op render just a substring
of the text node's glyph string.
Daniel Boles [Wed, 20 Sep 2017 22:53:54 +0000 (23:53 +0100)]
ToolItem: Fix nullable annotation put on wrong arg
D’oh
Daniel Boles [Tue, 5 Sep 2017 14:44:00 +0000 (15:44 +0100)]
gdkseatdefault: Grab touch events where applicable
gdk_seat_default_grab() grabs POINTER_EVENTS if the capability is
GDK_SEAT_CAPABILITY_ALL_POINTING. But that enumerator is a union that
includes GDK_SEAT_CAPABILITY_TOUCH, but we never grabbed TOUCH_EVENTS,
an unused macro that was presumably created with this purpose in mind.
So, check which of the ALL_POINTING capabilities we have, and set the
right mask of POINTER_EVENTS and/or TOUCH_EVENTS as required.
As part of this, explicitly let TABLET_STYLUS take over pointer events,
as this is the intended behaviour and was the effective result before.
This should fix touch events being lost in migrating from Device.grab()
to Seat.grab(GDK_SEAT_CAPABILITY_ALL_POINTING), as found by Inkscape.
https://bugzilla.gnome.org/show_bug.cgi?id=781757
Daniel Boles [Wed, 20 Sep 2017 16:34:43 +0000 (17:34 +0100)]
Overlay: Document style classes added per position